import 'package:flutter/material.dart';
import 'patient_input_screen.dart';
import 'calculations_screen.dart';
import 'whats_new_screen.dart'; // Импортируем экран "Что нового?"

class HomeScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Главная'),
        actions: <Widget>[
          IconButton(
            icon: Icon(Icons.info),
            onPressed: () {
              Navigator.push(
                context,
                MaterialPageRoute(builder: (context) => WhatsNewScreen()),
              );
            },
          ),
        ],
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            ElevatedButton(
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(builder: (context) => PatientInputScreen()),
                );
              },
              child: Text('Ввод данных пациента'),
            ),
            SizedBox(height: 20),
            ElevatedButton(
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(builder: (context) => CalculationsScreen()),
                );
              },
              child: Text('Расчеты'),
            ),
          ],
        ),
      ),
    );
  }
}
